<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="js/jquery.min.js"></script>
    <script>
        $.ajax({
            type:"GET",
            url: "http://localhost:8080/preUser",
            dataType:"json",
            success:function(data, status, xhr){
                console.log(data);
                console.log(xhr.getAllResponseHeaders());
            },
            error:function(jqXHR){
                console.log("Error: "+jqXHR.status);
            }
        });

        $.ajax({
            type: "get",
            url: "http://localhost:8080/jsonp",
            dataType: "jsonp",
            jsonp: "jsonpCallback",//服务端用于接收callback调用的function名的参数
            success: function(json) {
                console.log(JSON.stringify(json));
            }
        });
    </script>
</head>
<body>
cores.html
</body>
</html>
